package hander

import (
	"github.com/gin-gonic/gin"
	"redbook/api/reponse"
)

func Upload(c *gin.Context) {
	//file, err := c.FormFile("image")
	//if err != nil {
	//	return
	//}
	//ext := filepath.Ext(file.Filename)
	//if ext != ".png" && ext != ".jpg" {
	//	reponse.ErrorRouth(c, "文件格式不正确")
	//	return
	//}
	//upload, err := pkg.Upload(file)
	//if err != nil {
	//	reponse.ErrorRouth(c, "上传失败")
	//	return
	//}
	reponse.SuccessRouth(c, "上传成功", "http://sz28floc8.hn-bkt.clouddn.com/1.png")

}
